package com.minis.main;

/**
 * Create by chen on 2025/8/9 15:51
 */
public class CService {
    private String name;
    private int age;

    private AService aService;

    public CService(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setAService(AService aService) {
        this.aService = aService;
    }

    public void hello() {
        System.out.println("CService: hello, I'm " + name + ", " + age + " years old.");
    }

    public void call(String name) {
        System.out.println("CService: call " + name);
        aService.call(name);
    }
}
